#@layout()

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            新增/修改
            <small>Trace Add/Edit</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form class="form-horizontal autoAjaxSubmit" autocomplete="off"
                          method="post"
                          data-ok-href="#(CPATH)/admin/addon/trace/index"
                          action="#(CPATH)/admin/addon/trace/addEditSave">
                        <div class="box-body">
                        	<input type="hidden" value="#(trace.id ??)" name="lookBack.id">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">trace标题</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="trace标题"
                                           name="lookBack.title" value="#(trace.title ??)">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">时间</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control trace-plugin-time datepicker"
                                           name="lookBack.date" value="#if(trace.date ??) #date(trace.date) #end">
                                </div>
                            </div>
                            
                            #if(trace.id ??)
                            #trace(id=trace.id)
                            #for(traceLine: lines)
                            <div class="form-group i-group">
                                <label class="col-sm-2 control-label">第#(for.count)组图片</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="第一组图片"
                                           name="lookBackLine.image" value="#(traceLine.image ??)">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group c-group">
                                <label class="col-sm-2 control-label">第#(for.count)组内容</label>
                                <div class="col-sm-6">
                                    <textarea class="form-control"
                                           name="lookBackLine.content">#(traceLine.content ??)</textarea>
                                </div>
                            </div>
                            #if(for.last) #set(group=for.count) #end;
                            #end
                            #for(i=group; i < 3; i++)
                            <div class="form-group i-group">
                                <label class="col-sm-2 control-label">第#(i+1)组图片</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="第#(i+1)组图片"
                                           name="lookBackLine.image" value="">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group c-group">
                                <label class="col-sm-2 control-label">第#(i+1)组内容</label>
                                <div class="col-sm-6">
                                    <textarea class="form-control"
                                           name="lookBackLine.content"></textarea>
                                </div>
                            </div>
                            #end
                            #end
                            #else
                            <div class="form-group i-group">
                                <label class="col-sm-2 control-label">第1组图片</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="第1组图片"
                                           name="lookBackLine.image" value="">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group c-group">
                                <label class="col-sm-2 control-label">第1组内容</label>
                                <div class="col-sm-6">
                                    <textarea class="form-control"
                                           name="lookBackLine.content"></textarea>
                                </div>
                            </div>
                            <div class="form-group i-group">
                                <label class="col-sm-2 control-label">第2组图片</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="第2组图片"
                                           name="lookBackLine.image" value="">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group c-group">
                                <label class="col-sm-2 control-label">第2组内容</label>
                                <div class="col-sm-6">
                                    <textarea class="form-control"
                                           name="lookBackLine.content"></textarea>
                                </div>
                            </div>
                            <div class="form-group i-group">
                                <label class="col-sm-2 control-label">第3图片</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" placeholder="第3组图片"
                                           name="lookBackLine.image" value="">
                                    <!-- <p class="help-block"> 登录名不支持修改 </p> -->

                                </div>
                            </div>
                            <div class="form-group c-group">
                                <label class="col-sm-2 control-label">第3组内容</label>
                                <div class="col-sm-6">
                                    <textarea class="form-control"
                                           name="lookBackLine.content"></textarea>
                                </div>
                            </div>
                            #end
                            
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="col-sm-offset-2 col-sm-10 submit-block">
                                <div class="box-submit">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>


</div>
#end
